package com.cblue.qimokao.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.cblue.qimokao.entity.User;
import com.cblue.qimokao.mapper.UserMapper;
import com.cblue.qimokao.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class UserServiceImpl implements UserService {

    @Resource
    private UserMapper userMapper;


    @Override
    public User selectByUser(User user) {
        QueryWrapper<User> userQueryWrapper = new QueryWrapper<>();
        userQueryWrapper.eq("username",user.getUsername());
        userQueryWrapper.eq("userpass",user.getUserpass());
        return  userMapper.selectOne(userQueryWrapper);
    }
}
